package com.ssa.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * ytx LoginController
 *
 * @author <a href="mailto:chenlsh@ytx.com">陈录顺</a>
 * @since 1.0.0
 */
@Controller
@Api(value = "用户controller", tags = {"用户操作接口"})
public class LoginController {

    @ApiOperation(value = "api名称", notes = "关于这个API的更详细的说明")
    @ApiImplicitParam(name = "name", value = "参数说明", required = true, dataType = "String")
    @GetMapping("/index")
    public String index(@RequestParam String name) {
        return "login";
    }

    @ApiOperation(value = "api名称", notes = "关于这个API的更详细的说明")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "key", value = "about key", required = true, dataType = "String"),
            @ApiImplicitParam(name = "value", value = "about value", required = true, dataType = "String")
    })
    @GetMapping("/index2")
    public String index2(@RequestParam String key,
                         @RequestParam String value) {
        return "login";
    }
}
